<?php $this->headScript()->appendFile(HTTP_HOST.'/js/site-admin/RegionPages.js'); ?>
<?php $this->headScript()->appendFile(HTTP_HOST.'/js/jQuery/_redactered_ckeditor/ckeditor.js'); ?>
<?php $this->headScript()->appendFile(HTTP_HOST.'/js/jQuery/_redactered_ckeditor/sample.js'); ?>
<?php $this->headScript()->appendFile(HTTP_HOST.'/js/jQuery/_redactered_ckeditor/sample.css'); ?>
<h3><?=$this->cpages['ID'] == 0 ? $this->translate('Добавить информационую страницу региона') : $this->translate('Редактировать информационую страницу региона')?></h3>
<input type="hidden" name="id" value="<?=$this->cpages['ID']?>" />
<table border="1">
	<tr>
		<td>
			<?=$this->translate('Страна')?>
		</td>
		<td>
			<form method="get" action="<?=HTTP_HOST?>/site-admin/region-page/edit/addnew/1?country=<?=$this->country?>">
				<?=$this->formSelect('country', $this->country, array('onchange' => 'this.form.submit();'), $this->countries);?>
			</form>
		</td>
	</tr>
	<tr>
		<td>
			<?=$this->translate('Регион')?>
		</td>
		<td>
			<form method="get" action="<?=$this->url(array('action' => 'index'))?>"<?=$this->country == 0 ? ' style="display: none;"' : ''?>>
				<?=$this->formSelect('region', $this->region, null, $this->regions);?>
			</form>
		</td>
	</tr>
	<tr>
		<td><?=$this->translate('Заголовок страницы')?>: </td>
		<td><input type="text" name="Title" value="<?=$this->cpages['Title']?>" /></td>
	</tr>
	<tr>
		<td colspan="2"><textarea id="Content" name="Content"><?=$this->cpages['Content']; ?></textarea></td>
		<script type="text/javascript">
			//<![CDATA[
				CKEDITOR.replace( 'Content',{
				});
			//]]>
		</script>
	</tr>
	<tr>	
		<td><?=$this->translate('Активная')?>: </td>
		<td>
			<input type="checkbox" name="active"<?=$this->cpages['active'] == 1 ? ' checked="checked"' : ''?>/>
		</td>
	</tr>
	<tr>
		<td><?=$this->translate('SEO Title')?>: </td>
		<td><textarea name="seoTitle"><?=$this->cpages['seoTitle']?></textarea></td>
	</tr>
	<tr>
		<td><?=$this->translate('SEO Keywords')?>: </td>
		<td><textarea name="seoKeywords"><?=$this->cpages['seoKeywords']?></textarea></td>
	</tr>
	<tr>
		<td><?=$this->translate('SEO Description')?>: </td>
		<td><textarea name="seoDescription"><?=$this->cpages['seoDescription']?></textarea></td>
	</tr>
	<?php if($this->cpages['ID'] != 0): ?>
		<tr>	
			<td><?=$this->translate('Порядк сортировки')?>: </td>
			<td><input type="text" name="Order" value="<?=$this->cpages['Order']?>" /></td>
		</tr>
	<?php endif; ?>

	<tr>
		<td colspan="2" align="right">
			<input type="button" value="<?=$this->translate('Сохранить')?>" onclick="saveRegionPage();" />
		</td>
	</tr>
</table>